1. Field
Embodiments of the present invention relate generally to performance monitoring of virtualized systems and, more specifically, to efficient methods of associating performance information collected by an external instrument in a primary domain with execution states of virtual domains.
2. Description
Modern performance monitoring methods enable fine granularity measurements of various operational aspects of processor functional units. Highly sophisticated processor performance monitoring units (PMUs) and specialized performance monitoring tools provide necessary assistance to a programmer in locating performance inefficiencies, determining their root causes, and finding the best solution to improve program performance.
Unfortunately, the majority of the aforementioned performance monitoring instruments and techniques are not available in virtualized environments as the actual software activity within a virtual machine is visible only to a virtual machine manager and is completely transparent to other programs operating on a physical machine (primary domain programs). Thus, traditional means of performance monitoring become insufficient to associate processor (as well as any other hardware) performance characteristics collected in the primary domain with the execution states (e.g., instruction addresses and task contexts) of programs running inside the virtual machine.
A natural step to employ the power of modern processor capabilities in the analysis of virtualized system performance might be complete virtualization of PMU hardware, enabling operation of the traditional performance monitoring tools inside the virtual machine as if executed by a physical processor. However, this approach may in some cases be inefficient with regard to both performance and design complexity of a virtualization engine. Thus, the absence of industry standards for performance monitoring units determines the existence of a great variety of PMU designs, and, in its turn, complicates the virtualization. Besides, in many cases, performance measurements have to be performed by real PMUs, as some parts of virtualized code may be directly executed by the physical processor in order to accelerate the virtualization. It may constitute a problem when trying to simulate a processor whose performance monitoring capabilities differ from those of the physical system. Moreover, in pure-software virtualization engines (as well as in some hardware-assisted ones) the virtual machine manager responsible for the actual simulation is implemented as a process operating in the context of the primary domain operating system, hence the necessity to control task scheduling of the primary operating system in order to exclude unrelated performance data, as the PMU may otherwise continue operation while other primary domain programs or virtual machines are active.
Therefore, a need exists for the capability to assign processor performance characteristics to the actual software activity points within a virtual machine with the highest possible accuracy, while minimizing the collection intrusiveness level and keeping the complexity of the virtualization engine within acceptable limits.